package cn.tedu.submarine;
/** 整个游戏世界 */
public class World {
    public static void main(String[] args) {
        /*
        ObserveSubmarine[] oses = new ObserveSubmarine[3];
        oses[0] = new ObserveSubmarine();
        oses[1] = new ObserveSubmarine();
        oses[2] = new ObserveSubmarine();
        for(int i=0;i<oses.length;i++){ //遍历所有侦察潜艇
            ObserveSubmarine s = oses[i]; //获取每一个侦察潜艇
            System.out.println(s.x+","+s.y+","+s.speed); //输出每个侦察潜艇的x,y,speed
            s.move(); //每个侦察潜艇移动
        }

        TorpedoSubmarine[] tses = new TorpedoSubmarine[2];
        tses[0] = new TorpedoSubmarine();
        tses[1] = new TorpedoSubmarine();
        for(int i=0;i<tses.length;i++){
            TorpedoSubmarine t = tses[i];
            System.out.println(t.x+","+t.y+","+t.speed);
            t.move();
        }

        MineSubmarine[] mses = new MineSubmarine[4];
        mses[0] = new MineSubmarine();
        mses[1] = new MineSubmarine();
        mses[2] = new MineSubmarine();
        mses[3] = new MineSubmarine();
        for(int i=0;i<mses.length;i++){
            MineSubmarine m = mses[i];
            System.out.println(m.x+","+m.y+","+m.speed);
            m.move();
        }

        Mine[] ms = new Mine[3];
        ms[0] = new Mine(100,200);
        ms[1] = new Mine(200,300);
        ms[2] = new Mine(222,333);
        for(int i=0;i<ms.length;i++){
            Mine m = ms[i];
            System.out.println(m.x+","+m.y+","+m.speed); //输出每个炸弹的x,y,speed
            m.move(); //每个炸弹移动
        }

        Bomb[] bs = new Bomb[2];
        bs[0] = new Bomb(100,200);
        bs[1] = new Bomb(200,300);
        for(int i=0;i<bs.length;i++){
            Bomb b = bs[i];
            System.out.println(b.x+","+b.y+","+b.speed); //输出每个炸弹的x,y,speed
            b.move(); //每个炸弹移动
        }
         */
        ObserveSubmarine[] oses = new ObserveSubmarine[3];
        oses[0] = nextObserveSubmarine();
        oses[1] = nextObserveSubmarine();
        oses[2] = nextObserveSubmarine();
    }

    /** 生成侦察潜艇对象 */
    public static ObserveSubmarine nextObserveSubmarine(){
        //ObserveSubmarine o = new ObserveSubmarine();
        //return o;
        return new ObserveSubmarine();
    }
}


















